<template>
	<view>
		<view class="smart-page-head">
			<view class="smart-page-head-litle">audio音频</view>
		</view>
		<view>
			<button type="primary" @click="play()">播放</button>
			<audio id="myaudio" name="我爱你,祖国" controls="true" poster="../../../static/logo.png"
			author="贝多芬" src="../../../static/audio/music.mp3"></audio>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				
			}
			onReady:function(){
				this.audioContext = uni.createAudioContext("myaudio");

			}
		},
		methods: {
			play(){
				this.audioContext.play;
			},
			pause(){
				this.aucioContext.pause;
			}
		}
		
	}
</script>

<style>
</style>